package com.ca.dubbo.web.config;

import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Author Name: Justice
 * Project Name: zookeeperdubbo
 * File Name: DubboConfig
 * Package Name: com.ca.dubbo.web.config
 * Date: 2020-02-22 14:17
 * Copyright (c) 2020,All Rights Reserved.
 */

@Configuration
public class DubboConfig {
    @Bean
    public ApplicationConfig config() {
        ApplicationConfig config = new ApplicationConfig();
        config.setName("dubboweb");
        return config;
    }

    @Bean
    public RegistryConfig registryConfig() {
        RegistryConfig registryConfig = new RegistryConfig();
        registryConfig.setProtocol("zookeeper");
        registryConfig.setAddress("localhost:2181");
        return registryConfig;
    }
}
